<%-- 
    Document   : login
    Created on : Dec 3, 2014, 10:16:57 PM
    Author     : Hai
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>

    <head>
        <meta charset="UTF-8">
        <title>Login Form - GO ! Travel</title>
        <script src="config/jquery-validation-1.13.1/jquery.js" type="text/javascript"></script>
        <script src="config/jquery-validation-1.13.1/jquery.validate.min.js" type="text/javascript"></script>
        <link href="config/css/cssFormLogin.css" rel="stylesheet" type="text/css"/>
        <link href="config/bootstrapLib/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
        <script src="config/jqueryLib/jquery-1.11.0.js" type="text/javascript"></script>
        <script src="config/jqueryLib/jquery.validate.min.js" type="text/javascript"></script>
        <script src="config/bootstrapLib/js/bootstrap.js" type="text/javascript"></script>
        <script src="config/js/validateLogin.js" type="text/javascript"></script>
        
    </head>

    <body>
        <div class="form-group">
            <form method="POST" action="/index.jsp" class="form-group" ">
                <div class="body"></div>
                <div class="grad"></div>
                <div class="header">
                    <div>Go ! <span>Travel</span></div><br />
                </div>
                <br />
                <div class="login" id="fLog">
                    <input class="form-control" type="text" placeholder="username" name="user"><br>
                    <input class="form-control" type="password" placeholder="password" name="password"><br>
                    <input  class="btn btn-primary" type="submit" value="Login">
                    <br/>
                    <input type="button" class="btn btn-primary" data-toggle="modal" data-target="#formReg" value="Register"></button>
                </div>

            </form>
        </div>
        
        

        <div class="modal fade" id="formReg" aria-hidden="true">
            <div class="modal-dialog">
                <link href="config/bootstrapLib/css/cssRegister.css" rel="stylesheet" type="text/css"/>

                <div class="register-title">
                    <h4 class="modal-title">Register</h4>
                </div>
                <form class="register modal-content" id="signupForm">
                    <div class="register-switch">
                        <input type="radio" name="sex" value="F" id="sex_f" class="register-switch-input" checked>
                        <label for="sex_f" class="register-switch-label">Female</label>
                        <input type="radio" name="sex" value="M" id="sex_m" class="register-switch-input">
                        <label for="sex_m" class="register-switch-label">Male</label>
                    </div>

                    <label for="username">Name</label>
                    <input type="text" class="register-input" placeholder="Username" name="u">

                    <label for="password">Name</label>
                    <input type="password" class="register-input" placeholder="Create a password" name="p">

                    <label for="confirm_password">Name</label>
                    <input type="password" class="register-input" placeholder="Confirm your password" name="cp">

                    <label for="email">Name</label>
                    <input type="email" class="register-input" placeholder="Email" name="email" >

                    <input type="submit" value="Create Account" class="register-button">

                    <br/>
                    <button class="btn btn-block bg-primary" data-dismiss="modal">Close</button>

                </form>


            </div>
        </div>

        <script>
            $(document).ready(function () {

                $('#regis').click(function () {
                    $.get("/register?u=" + $("#rUse").val() + "&p=" + $("#rPass").val() + "&email=" + $('#email').val(), function (data) {
                        $('#regReport').html(data);
                    });
                });

            });

        </script>
    </body>
</html>
